#ifndef ADDAO
#define ADDAO
#include "adLogic.h"
#define AD_DB_PATH "/home/syc/ronghuanet_ads/ads.db"

int saveAd(Ad *ad);
int updateAd(Ad *ad);
Ad* getAd(int id);

int saveAr(AdResource *ar);
int updateAr(AdResource *ar);
AdResource *getAr(int adid,int indexTmp);

//清理过期广告
int clearExpireAd();
#endif